wfMkdirParents( $mydir2 );
}
- public function saveToFileCache( $origtext ) {
+ public function saveToFileCache( $text ) {
global $wgUseFileCache;
- if( !$wgUseFileCache ) {
- return $origtext; // return to output
+ if( !$wgUseFileCache || strlen( $text ) < 512 ) {
+ // Disabled or empty/broken output (OOM and PHP errors)
+ return $text;
}
- $text = $origtext;
- // Empty?
- if( strcmp($text,'') == 0 ) return '';
- // Probably broken? (OOM and PHP errors)
- if( mb_strlen($text) < 512 ) return $origtext;
wfDebug(" saveToFileCache()\n", false);